package com.hqd.ch03.v18.aop.support;

import com.hqd.ch03.v18.aop.ClassFilter;
import lombok.AllArgsConstructor;

/**
 * 子类匹配器
 */
@AllArgsConstructor
public class RootClassFilter implements ClassFilter {
    private final Class<?> clazz;


    @Override
    public boolean matches(Class<?> clazz) {
        return this.clazz.isAssignableFrom(clazz);
    }
}
